2740d00a7bd3f89737c6365966e4e00a935aae0b,fabric/fabric-core/src/main/scala/org/fusesource/fabric/service/KarafContainerRegistration.java,KarafContainerRegistration,configurationEvent,#ConfigurationEvent#,453
Before Change
int sshPort = Integer.parseInt((String) config.getProperties().get(SSH_KEY));
String sshUrl = getSshUrl(name, sshPort);
ZooKeeperUtils.set(zooKeeper, CONTAINER_SSH.getPath(name), sshUrl);
fabricService.getPortService().unRegisterPort(current, SSH_PID);
fabricService.getPortService().registerPort(current, SSH_PID, SSH_KEY, sshPort);
}
if (event.getPid().equals(HTTP_PID) && event.getType() == ConfigurationEvent.CM_UPDATED) {
Configuration config = configurationAdmin.getConfiguration(HTTP_PID);
After Change
int sshPort = Integer.parseInt((String) config.getProperties().get(SSH_KEY));
String sshUrl = getSshUrl(name, sshPort);
ZooKeeperUtils.set(zooKeeper, CONTAINER_SSH.getPath(name), sshUrl);
if (fabricService.getPortService().lookupPort(current, SSH_PID, SSH_KEY) != sshPort) {
fabricService.getPortService().unRegisterPort(current, SSH_PID);
fabricService.getPortService().registerPort(current, SSH_PID, SSH_KEY, sshPort);
}
}
if (event.getPid().equals(HTTP_PID) && event.getType() == ConfigurationEvent.CM_UPDATED) {